package com.exception.test1;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-09-19
 * Time: 17:52
 */

//异常的分类之：运行时异常
public class Test6 {
    public static void main(String[] args) {
        //运行时异常：
        int[] arr = {1,2,3};
        System.out.println(arr.length);
        /*int[] arr2 = null;
        System.out.println(arr2.length);*/      //NullPointerException空指针异常
        System.out.println(arr[10]);           //ArrayIndexOuterofBoundsException数组越界异常
    }
}
